import {get,post} from "./http"
//登录
export const reqLogin=(user)=>post("/api/login",user)

//注册
export const reqRegister=user=>post("/api/register",user)

//分类
export const reqHomeCate=()=>get("/api/getCate")

//列表
export const reqList=(params)=>get("/api/getgoodlist",params)

//详情
export const reqDetail=params=>get("/api/getgoodsinfo",params)

//轮播图
export const reqlunbo=()=>get("/api/getbanner")

//限时秒杀
export const reqmiaosha=()=>get("/api/getcates")

//首页 底部商品信息
export const reqxinxi=()=>get("/api/gethortgoods")

//首页搜索
export const reqsearch=(params)=>get("/api/search",params)

//分类
export const reqgetCates = ()=>get('/api/getcates')


//购物车列表
export const reqcartlist= (params)=>get('/api/cartlist',params)

//购物车添加
export const reqcartadd= (params)=>post('/api/cartadd',params)

//购物车修改
export const reqcartedit= (params)=>post('/api/cartedit',params)

//购物车删除
export const reqcartdelete= (params)=>post('/api/cartdelete',params)


//地址list
export const reqAddressList=params=>get("/api/addresslist",params)

//添加地址
export const reqaddresssadd=params=>post("/api/addressadd",params)

//地址编辑
export const reqaddressedit=params=>post("api/addressedit",params)

//订单生成
export const reqorderadd= (params)=>post('/api/orderadd',params)